package common.nacos.demo03.controller;

import com.example.alibabacloudcommonsresult.entity.JsonResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/shopping")
@RestController
public class ShoppingController {
  private static final Logger log = LoggerFactory.getLogger(ShoppingController.class);
  
  @GetMapping("/create/{id}")
  public JsonResult<String> create(@PathVariable("id") String id) {
    log.info("{} 商品购买成功.", id);
    return new JsonResult<>(200, "商品购买成功. " + id);
  }
}
